﻿ //bookmark halaman//
function bookmarksite(title,url){
if (window.sidebar) 
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ 
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)
	window.external.AddFavorite(url, title);
}

//window baru//
var win=null;
var rootdomain = "http://www.infogue.com";
var rootimage = rootdomain+'/img/widgets/icon/';
function Buka(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}


document.write('<a class="wsg_link" href="http://www.infogue.com/" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, \'125px\')" onMouseout="delayhidemenu()"><img src="'+rootdomain+'/img/widgets/sharegue.gif" border="0"></a>');
document.write('<link href="'+rootdomain+'/css/widget_sharegue.css" rel="stylesheet" type="text/css"></style>');
//Contents for menu 1
var menu1=new Array()
menu1[0]='<table width="125" border="0" cellspacing="0" cellpadding="0" class="wsg_table">'+
	'<tr><td colspan="2" bgcolor="#95000"><div align="center"><font color="#ffffff">Bookmark & Sharing</font> </div></td></tr>'+
	'<tr><td colspan="2" align="right"><img src="'+rootimage+'/separate-indo.gif"></td></tr>'+
	'<tr><td width="20"><img src="'+rootimage+'/ig.png" width="14" height="14" alt="infogue"></td> <td width="98"><a class="wsg_link" href="http://www.infogue.com/login/?return='+ ig_url +'" onClick="Buka(this.href,\'infogue\',\'640\',\'480\',\'yes\',\'center\');return false" onFocus="this.blur()">Infogue</a></td></tr>'+
	'<tr><td><img src="'+rootimage+'/lintasb.gif" width="16" height="16"></td> <td><a class="wsg_link" href="http://www.lintasberita.com/submit.php?phase=2&url='+ ig_url +'" onClick="Buka(this.href,\'infogue\',\'640\',\'480\',\'yes\',\'center\');return false" onFocus="this.blur()">LintasBerita</a></td></tr>'+
	'<tr><td><img src="'+rootimage+'/blogm.gif" width="14" height="14"></td><td><a class="wsg_link" href="http://blog-m.com/submit" onClick="Buka(this.href,\'infogue\',\'640\',\'480\',\'yes\',\'center\');return false" onFocus="this.blur()">Blog-M</a></td> </tr>'+
	'<tr><td><img src="'+rootimage+'/indotag.gif" width="15" height="18"></td> <td><a class="wsg_link" href="http://id.indotag.com/evb/check_url.php?url='+ ig_url +'" onClick="Buka(this.href,\'infogue\',\'640\',\'480\',\'yes\',\'center\');return false" onFocus="this.blur()">IndoTag</a></td></tr>'+
	'<tr><td><img src="'+rootimage+'/kilasan.gif" width="16" height="16"></td> <td><a class="wsg_link" href="http://kilasan.com/submit.php?act=kirim&kategori=hiburan&link='+ ig_url +'" onClick="Buka(this.href,\'infogue\',\'640\',\'480\',\'yes\',\'center\');return false" onFocus="this.blur()">Kilasan</a></td></tr>'+
	'<tr><td><img src="'+rootimage+'/favorites.png" width="16" height="16" alt="Favotites"></td> <td><a class="wsg_link" href="javascript:bookmarksite(\''+ ig_judul +'\', \''+ ig_url +'\')">Favorites</a></td></tr>'+
	'<tr><td align="right" colspan="2"><img src="'+rootimage+'/separate-inter.gif"></td></tr>'+
	'<tr><td><img src="'+rootimage+'/digg.png" alt="digg" width="16" height="16"></td> <td><a class="wsg_link" href="http://digg.com/submit/'+ ig_url +'" onClick="Buka(this.href,\'infogue\',\'640\',\'480\',\'yes\',\'center\');return false" onFocus="this.blur()">Digg</a></td></tr>'+
	'<tr><td><img src="'+rootimage+'/reddit.gif" width="18" height="18" alt="reddit"></td><td><a class="wsg_link" href="http://www.reddit.com/button_content?t=1&url='+ ig_url +'" onClick="Buka(this.href,\'infogue\',\'640\',\'480\',\'yes\',\'center\');return false" onFocus="this.blur()">Reddit</a></td></tr>'+
	'<tr><td><img src="'+rootimage+'/delicious.png" alt="del.icio.us" width="16" height="16"></td><td><a class="wsg_link" href="https://secure.del.icio.us/login" onClick="Buka(this.href,\'infogue\',\'640\',\'480\',\'yes\',\'center\');return false" onFocus="this.blur()">Del.icio.us</a></td></tr>'+
	'<tr><td><img src="'+rootimage+'/facebook.gif" alt="facebook" width="16" height="16"></td><td> <a class="wsg_link" href="https://ssl.facebook.com/login.php?popup&next=http%253A%252F%252Fwww.facebook.com%252Fsharer.php%253Fu%253D'+ ig_url +'%2526t%253D'+ ig_judul +'" onClick="Buka(this.href,\'infogue\',\'640\',\'480\',\'yes\',\'center\');return false" onFocus="this.blur()">Facebook</a></td></tr>'+
	'<tr><td><img src="'+rootimage+'/yahoo-myweb.png" alt="yahoo" width="18" height="18"></td><td><a class="wsg_link" href="https://login.yahoo.com/config/login?.src=bmk2&.intl=us&.done=http%3A%2F%2Fbookmarks.yahoo.com%2Ftoolbar%2Fsavebm%3Fopener%3Dtb%26amp%3Bu%3Dhttp%253A%252F%252F'+ ig_url +'%26amp%3Bt%3D'+ ig_judul +'" onClick="Buka(this.href,\'infogue\',\'640\',\'480\',\'yes\',\'center\');return false" onFocus="this.blur()">Yahoo</a></td></tr>'+
	'<tr><td><img src="'+rootimage+'/furl.gif" alt="Furl" width="16" height="16"></td><td><a class="wsg_link" href="http://www.furl.net/members/login?original_url=%2Fsavedialog.jsp%3Fp%3D1%26u%3Dhttp%253A%252F%252F'+ ig_url +'%26t%3D'+ ig_judul +'%26r%3D%26v%3D1%26c%3D%26from_login%3D1" onClick="Buka(this.href,\'infogue\',\'640\',\'480\',\'yes\',\'center\');return false" onFocus="this.blur()">Furl </a></td></tr>'+
	'<tr><td><img src="'+rootimage+'/myspace.png" alt="myspace" width="20" height="17"></td><td><a class="wsg_link" href="http://www.myspace.com/Modules/PostTo/Pages/?u='+ ig_url +'&t='+ ig_judul +'&c=" onClick="Buka(this.href,\'infogue\',\'640\',\'480\',\'yes\',\'center\');return false" onFocus="this.blur()">Myspace</a></td></tr>'+
	'<tr><td><img src="'+rootimage+'/more.gif"></td> <td><a class="wsg_link" href="http://www.infogue.com/widgets/sharegue/bookmark.php" target="_blank">Lainnya</a></td></tr>'+
	'<tr><td colspan="2" align="right" ><br> <img src="'+rootimage+'/ig_corner.gif" alt="infogue" width="50" height="9" longdesc="http://www.infogue.com"></td></tr></table>';

var menuwidth='165px' //default menu width
var menubgcolor='white'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?
 
var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)

dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

